headerbar: Replace gtk_widget_destroy() call
authorTimm Bäder <mail@baedert.org>
Fri, 21 Feb 2020 12:04:44 +0000 (13:04 +0100)
committerTimm Bäder <mail@baedert.org>
Tue, 25 Feb 2020 10:08:25 +0000 (11:08 +0100)
gtk/gtkheaderbar.c

index 1a81f327bc3d00fb87566c7ed56a448c21ae2d2a..ca56f4fba12c5bdea6509eab3b50abf1a14f2882 100644 (file)
@@ -386,7 +386,8 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
 
                   if (!_gtk_header_bar_update_window_icon (bar, window))
                     {
-                      gtk_widget_destroy (button);
+                      g_object_ref_sink (button);
+                      g_object_unref (button);
                       priv->titlebar_icon = NULL;
                       button = NULL;
                     }